import React, {Component} from "react";

class MyHeader extends Component {
  constructor(props){
    super(props)
    this.state = {
      title: '龙泉驿区社区医院医生管理系统',
      isLogin: true,
      userInfo:{name:'wqw'}
    }
  }
  render(){
    // 创建react元素；
    const e = (
      <div>
        <div className="header-userinfo">
          {this.state.isLogin === true ? this.state.userInfo.name+',欢迎光临':'请登录'}
        </div>
        <div className="header-title">
        {this.state.title}
        </div>
        <div className="header-tools">
          <button type="button" className="editUser">修改用户信息</button>
          <button type="button" className="exit">退出</button>
        </div>
      </div>
    );
    return e;
  }
}

// 最好是在代码的最好一行公开对象
export default MyHeader;